package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.*;
import org.jsola.hr.query.CompanyAdditionalFieldsQuery;
import org.jsola.hr.vo.CompanyAdditionalFieldsListVO;
import org.jsola.hr.vo.CompanyAdditionalFieldsVO;

import java.util.List;

/**
 * 公司员工额外字段表
 *
 * @author zhr
 */
@Api(tags = "hr-公司员工额外字段表")
public interface ICompanyAdditionalFieldsControllerAPI {

    /**
     * 月工资表表头查询
     *
     * @param companyId 用工单位id
     * @return Integer
     */
    @ApiOperation(value = "月工资表表头查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyId", dataType = "String", value = "用工单位id", paramType = "path")
    })
    Result<Integer> querySalaryHead(String companyId);

    /**
     * 更改公司表头字段
     *
     * @param companyAdditionalFieldsQuery 公司员工额外字段表查询参数
     * @return Integer
     */
    @ApiOperation(value = "更改公司表头字段")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsQuery", dataType = "CompanyAdditionalFieldsQuery", value = "公司员工额外字段表查询参数", paramType = "body")
    })
    Result<Integer> updateHead(CompanyAdditionalFieldsQuery companyAdditionalFieldsQuery);

    /**
     * 查询公司表头字段
     *
     * @param companyAdditionalFieldsQuery 公司员工额外字段表查询参数
     * @return List
     */
    @ApiOperation(value = "查询公司表头字段")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsQuery", dataType = "CompanyAdditionalFieldsQuery", value = "公司员工额外字段表查询参数", paramType = "query")
    })
    Result<CompanyAdditionalFieldsListVO> getHead(CompanyAdditionalFieldsQuery companyAdditionalFieldsQuery);

    /**
     * 新增公司员工额外字段表
     *
     * @param companyAdditionalFieldsAddDTO 公司员工额外字段表新增实体
     * @return 公司员工额外字段表展示对象
     */
    @ApiOperation(value = "新增公司员工额外字段表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsAddDTO", dataType = "CompanyAdditionalFieldsAddDTO", value = "新增公司员工额外字段表", paramType = "body")
    })
    Result<CompanyAdditionalFieldsVO> save(CompanyAdditionalFieldsAddDTO companyAdditionalFieldsAddDTO);

    @ApiOperation(value = "新增公司员工额外字段表 在租户下所有用工单位同步新增")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsAddDTO", dataType = "CompanyAdditionalFieldsAddDTO", value = "新增公司员工额外字段表", paramType = "body")
    })
    Result<CompanyAdditionalFieldsVO> save2(CompanyAdditionalFieldsAddDTO companyAdditionalFieldsAddDTO);

    /**
     * 新增自定义模板自定义字段
     *
     * @param companyAdditionalFieldsAddDTO 公司员工额外字段表新增实体
     * @return 公司员工额外字段表展示对象
     */
    @ApiOperation(value = "新增自定义模板自定义字段")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsAddDTO", dataType = "CompanyAdditionalFieldsAddDTO", value = "新增公司员工额外字段表", paramType = "body")
    })
    Result<CompanyAdditionalFieldsVO> saveForCustom(CompanyAdditionalFieldsAddDTO companyAdditionalFieldsAddDTO);


    /**
     * 修改公司员工额外字段表
     *
     * @param companyAdditionalFieldsUpdateDTO 公司员工额外字段表
     * @return 更新数量
     */
    @ApiOperation(value = "修改公司员工额外字段表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsUpdateDTO", dataType = "CompanyAdditionalFieldsUpdateDTO", value = "修改公司员工额外字段表", paramType = "body")
    })
    Result<Integer> update(CompanyAdditionalFieldsUpdateDTO companyAdditionalFieldsUpdateDTO);

    /**
     * 批量编辑、新增、删除公司员工额外字段表
     *
     * @param companyAdditionalFieldsBatchDTO 要操作的公司员工额外字段表
     * @return 操作之后的全部公司员工额外字段表
     */
    @ApiOperation(value = "批量编辑、新增、删除公司员工额外字段表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsBatchDTO", dataType = "CompanyAdditionalFieldsBatchDTO", value = "要操作的字段数据", paramType = "body")
    })
    Result batch(CompanyAdditionalFieldsBatchDTO companyAdditionalFieldsBatchDTO);

    /**
     * 修改公司员工额外字段表
     *
     * @param companyAdditionalFieldsUpdateDTO 公司员工额外字段表
     * @return 更新数量
     */
    @ApiOperation(value = "修改公司员工额外字段表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsUpdateDTO", dataType = "CompanyAdditionalFieldsUpdateDTO", value = "修改公司员工额外字段表", paramType = "body")
    })
    Result<Integer> update2(CompanyAdditionalFieldsUpdateDTO companyAdditionalFieldsUpdateDTO);

    /**
     * 开启/关闭自定义字段
     *
     * @param openFieldUpdateDTO 开启/关闭
     * @return 开启关闭自定义字段
     */
    @ApiOperation(value = "开启/关闭自定义字段")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "openFieldUpdateDTO", dataType = "OpenFieldUpdateDTO", value = "开启/关闭", paramType = "body")
    })
    Result<Integer> openField(OpenFieldUpdateDTO openFieldUpdateDTO);

    /**
     * 自定义字段是否必填
     *
     * @param necessaryFieldUpdateDTO 是否必填
     * @return 开启关闭自定义字段
     */
    @ApiOperation(value = "自定义字段是否必填")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "necessaryFieldUpdateDTO", dataType = "NecessaryFieldUpdateDTO", value = "是否必填", paramType = "body")
    })
    Result<Integer> necessaryField(NecessaryFieldUpdateDTO necessaryFieldUpdateDTO);

    /**
     * 修改自定义模板自定义字段
     *
     * @param companyAdditionalFieldsUpdateDTO 公司员工额外字段表
     * @return 更新数量
     */
    @ApiOperation(value = "修改自定义模板自定义字段")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsUpdateDTO", dataType = "CompanyAdditionalFieldsUpdateDTO", value = "修改公司员工额外字段表", paramType = "body")
    })
    Result<Integer> updateForCustom(CompanyAdditionalFieldsUpdateDTO companyAdditionalFieldsUpdateDTO);

    /**
     * 删除单个公司员工额外字段表，彻底删除
     *
     * @param companyAdditionalFieldsId 公司员工额外字段表id
     * @return 删除数量
     */
    @ApiOperation(value = "删除单个公司员工额外字段表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsId", dataType = "Long", value = "公司员工额外字段表id", paramType = "path")
    })
    Result<Integer> delete(Long companyAdditionalFieldsId);

    /**
     * 删除自定义模板自定义字段
     *
     * @param companyAdditionalFieldsId 公司员工额外字段表id
     * @return 删除数量
     */
    @ApiOperation(value = "删除自定义模板自定义字段")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsId", dataType = "Long", value = "公司员工额外字段表id", paramType = "path")
    })
    Result<Integer> deleteForCustom(Long companyAdditionalFieldsId);


    /**
     * 删除单个公司员工额外字段表，彻底删除
     *
     * @param companyAdditionalFieldsId 公司员工额外字段表id
     * @return 删除数量
     */
    @ApiOperation(value = "删除单个公司员工额外字段表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsId", dataType = "Long", value = "公司员工额外字段表id", paramType = "path")
    })
    Result<Integer> deleteForPc(Long companyAdditionalFieldsId);

    /**
     * 删除单个公司员工额外字段表 若字段被模板使用 第一次报错 第二次直接删除
     *
     * @param companyAdditionalFieldsId 公司员工额外字段表id
     * @return 删除数量
     */
    @ApiOperation(value = "删除单个公司员工额外字段表 若字段被模板使用 第一次报错 第二次直接删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsId", dataType = "Long", value = "公司员工额外字段表id", paramType = "path")
    })
    Result<Integer> deleteForPc2(Long companyAdditionalFieldsId);


    /**
     * 批量删除公司员工额外字段表，彻底删除
     *
     * @param companyAdditionalFieldsIds 公司员工额外字段表id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除公司员工额外字段表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsIds", dataType = "Long[]", value = "公司员工额外字段表id数组", paramType = "body", allowMultiple = true)
    })
    Result<Integer> deleteBatch(Long[] companyAdditionalFieldsIds);


    /**
     * 根据公司员工额外字段表id查询公司员工额外字段表详情
     *
     * @param companyAdditionalFieldsId 公司员工额外字段表id
     * @return 公司员工额外字段表详情
     */
    @ApiOperation(value = "根据公司员工额外字段表id查询公司员工额外字段表详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsId", dataType = "Long", value = "公司员工额外字段表id", paramType = "path")
    })
    Result<CompanyAdditionalFieldsVO> findById(Long companyAdditionalFieldsId);


    /**
     * 查询公司员工额外字段表
     *
     * @param companyAdditionalFieldsQuery 公司员工额外字段表查询参数
     * @return page
     */
    @ApiOperation(value = "查询公司员工额外字段表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsQuery", dataType = "CompanyAdditionalFieldsQuery", value = "公司员工额外字段表查询参数", paramType = "query")
    })
    Result<List<CompanyAdditionalFieldsListVO>> listAll(CompanyAdditionalFieldsQuery companyAdditionalFieldsQuery);


    /**
     * 查询额外字段
     *
     * @param moduleCode 模块code
     * @param companyId  用工单位id；租户：site
     * @param templateId 模板id
     * @return 额外字段
     */
    @ApiOperation(value = "查询额外字段")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "moduleCode", dataType = "String", value = "模块code", paramType = "query"),
            @ApiImplicitParam(name = "companyId", dataType = "String", value = "用工单位id；租户：site", paramType = "query"),
            @ApiImplicitParam(name = "templateId", dataType = "String", value = "模板id", paramType = "query")
    })
    Result<List<CompanyAdditionalFieldsListVO>> listByCompanyId(String moduleCode, String companyId, String templateId);


    /**
     * 分页查询公司员工额外字段表
     *
     * @param companyAdditionalFieldsQuery 公司员工额外字段表查询参数
     * @return page
     */
    @ApiOperation(value = "分页查询公司员工额外字段表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "companyAdditionalFieldsQuery", dataType = "CompanyAdditionalFieldsQuery", value = "公司员工额外字段表查询参数", paramType = "query")
    })
    Result<Page<CompanyAdditionalFieldsListVO>> page(CompanyAdditionalFieldsQuery companyAdditionalFieldsQuery);


}

